package com.onluy.frameworkcloud.batis.holder;

import com.onluy.frameworkcloud.batis.bean.Batch;

public abstract class BatchHolder
{
    private static final ThreadLocal<Batch> holder = new ThreadLocal();

    public static void setBatch(Batch batch) {
        holder.set(batch);
    }

    public static Batch getBatch() {
        return (Batch)holder.get();
    }

    public static void clear() {
        holder.remove();
    }
}